import axios from "~/axios";
import { queryFilters } from "~/composables/util";

// 获取列表
export function getPlatefromList({ ...data }) {
    let r
    if(data != {}){
        r = queryFilters(data)
    }else{
        r = ''
    }
    
    return axios.get(`/platefrom/list/${r}`)
}


// 获取全部平台
export function getPlatefromAll() {
    return axios.get(`/platefrom/all/`)
}

// 获取全部平台
export function getPlatefromByUser() {
    return axios.get(`/platefrom/all/by_user/`)
}


// 新增
export function postPlatefrom(data) {
    return axios.post(`/platefrom/list/`, data)
}

// 修改
export function putPlatefrom(id, data) {
    return axios.put(`/platefrom/list/${id}/`, data)
}
// 删除
export function deletePlatefrom(id) {
    return axios.delete(`/platefrom/list/${id}/`)
}